package com.ocom.common.vo.payconfig;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.ocom.common.request.exposeapi.tecsun.TecsunBaseRequest;
import lombok.Data;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Date;

@Data
public class SendMealCouponVo implements Serializable {

    @NotNull(message = "单位编号不能为空")
    private Long comId;

//    @NotNull(message = "订单号不能为空")
//    private String orderNo;

    @JsonProperty(value = "pCode")
    @NotNull(message = "学工号不能为空")
    private String pCode;

//    @JsonProperty(value = "pName")
//    private String pName;

    @JsonProperty(value = "voucherTypeId")
    @NotNull(message = "消费券种类id不能为空")
    private int voucherTypeId;

    @JsonProperty(value = "number")
    @NotNull(message = "发放数量不能为空")
    @Min(value = 1,message = "优惠券最小值为1")
    @Max(value = 999999,message = "优惠券最大为999999")
    private int number;

//    private List<Integer> pIds;
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @NotNull(message = "开始日期不能为空")
    private Date startDate;
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @NotNull(message = "截止日期不能为空")
    private Date stopDate;
}
